
Namespace _2bMatesSite.Controls
	Imports System
	Imports System.Data
	Imports System.Drawing
	Imports System.Web
	Imports System.Web.UI.WebControls
	Imports System.Web.UI.HtmlControls
	Imports _2bMatesSite.BO

	''' <summary>
	'''		Summary description for MusicTabs.
	''' </summary>
	Public Partial Class MusicTabs
		Inherits System.Web.UI.UserControl


		Private pageName As String = ""
		Private activeTab As Integer = -1
		Private id As Integer = -1

		Public Property PageName() As String
			Get
				Return pageName
			End Get
			Set
				pageName = value
			End Set
		End Property

		Public Property ActiveTab() As Integer
			Get
				Return activeTab
			End Get
			Set
				activeTab = value
			End Set
		End Property

		Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
			' Put user code to initialize the page here

			If Request.Params(Constants.SPECIAL_PAGE_TYPE_ID_PARAM) = Nothing OrElse Request.Params(Constants.SPECIAL_PAGE_TYPE_ID_PARAM) = "" Then
				Throw New Exception(Constants.ERROR_MESSAGE_MISSING_PARAMETERS)
			End If

			Try
				id = Convert.ToInt32(Request.Params(Constants.SPECIAL_PAGE_TYPE_ID_PARAM))
			Catch
				Throw New Exception(Constants.ERROR_MESSAGE_MISSING_PARAMETERS)
			End Try
			'SpecialPage CurrentPage = SpecialPages.GetSpecialPageByID(id);


			tdMusicOverviewLink.Visible = False
			tdMusicOverviewLinkOn.Visible = False
			tdMusicOverviewLabelOn.Visible = False
			tdBandInterviewsLink.Visible = False
			tdBandInterviewsLinkOn.Visible = False
			tdBandInterviewsLabelOn.Visible = False
			tdNewsLink.Visible = False
			tdNewsLinkOn.Visible = False
			tdNewsLabelOn.Visible = False
			tdMusicTracksLink.Visible = False
			tdMusicTracksLinkOn.Visible = False
			tdMusicTracksLabelOn.Visible = False

			hlMusicOverview.NavigateUrl = "../" + Constants.SPECIAL + "?" + Constants.SPECIAL_PAGE_TYPE_ID_PARAM + "=" + id
			hlMusicOverviewOn.NavigateUrl = hlMusicOverview.NavigateUrl
			hlBandInterviews.NavigateUrl = "../" + Constants.VIEW_ALL_NEWS_PAGE + "?" + Constants.SPECIAL_PAGE_TYPE_ID_PARAM + "=" + id + "&col=" + Convert.ToInt32(ArticleItem.ArticleItemType.ritInterview)
			hlBandInterviewsOn.NavigateUrl = hlBandInterviews.NavigateUrl
			hlNews.NavigateUrl = "../" + Constants.VIEW_ALL_NEWS_PAGE + "?" + Constants.SPECIAL_PAGE_TYPE_ID_PARAM + "=" + id + "&col=" + Convert.ToInt32(ArticleItem.ArticleItemType.ritNews)
			hlNewsOn.NavigateUrl = hlNews.NavigateUrl
			hlMusicTracks.NavigateUrl = "../" + Constants.VIEW_ALL_CONTENT_ITEMS_PAGE + "?" + Constants.SPECIAL_PAGE_TYPE_ID_PARAM + "=" + id
			hlMusicTracksOn.NavigateUrl = hlMusicTracks.NavigateUrl

			Select Case pageName
				Case Constants.SPECIAL
					tdMusicOverviewLabelOn.Visible = True
					tdBandInterviewsLink.Visible = True
					tdNewsLink.Visible = True
					tdMusicTracksLink.Visible = True
					Exit Select
				Case Constants.VIEW_ALL_NEWS_PAGE
					Select Case ActiveTab
						Case 1
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLink.Visible = True
							tdNewsLabelOn.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
						Case 2
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLabelOn.Visible = True
							tdNewsLink.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
						Case Else
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLink.Visible = True
							tdNewsLink.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
					End Select
					Exit Select
				Case Constants.VIEW_NEWS
					Select Case ActiveTab
						Case 1
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLink.Visible = True
							tdNewsLinkOn.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
						Case 2
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLinkOn.Visible = True
							tdNewsLink.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
						Case Else
							tdMusicOverviewLink.Visible = True
							tdBandInterviewsLink.Visible = True
							tdNewsLink.Visible = True
							tdMusicTracksLink.Visible = True
							Exit Select
					End Select
					Exit Select
				Case Constants.VIEW_ALL_CONTENT_ITEMS_PAGE
					tdMusicOverviewLink.Visible = True
					tdBandInterviewsLink.Visible = True
					tdNewsLink.Visible = True
					tdMusicTracksLabelOn.Visible = True
					Exit Select
				Case Constants.VIEW_CONTENT_ITEM
					tdMusicOverviewLink.Visible = True
					tdBandInterviewsLink.Visible = True
					tdNewsLink.Visible = True
					tdMusicTracksLinkOn.Visible = True
					Exit Select
				Case Else
					Exit Select

			End Select

		End Sub
		#region Web Form Designer generated code
		Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
			'
			' CODEGEN: This call is required by the ASP.NET Web Form Designer.
			'
			InitializeComponent()
			MyBase.OnInit(e)
		End Sub

		''' <summary>
		'''		Required method for Designer support - do not modify
		'''		the contents of this method with the code editor.
		''' </summary>
		Private Sub InitializeComponent()
		End Sub
#End Region
	End Class
End Namespace






